package com.cy.jt.controller;

import com.cy.jt.pojo.Report;
import com.cy.jt.service.ReportService;
import com.cy.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: LiuXingYu
 * @date: 2021/8/11 16:14
 */
@RestController
@RequestMapping("/report")
@CrossOrigin
public class ReportController {

    @Autowired
    private ReportService reportService;

    @GetMapping("/getData")
    public SysResult getData(){
        List<Report> reportList = reportService.getData();
        return SysResult.success(reportList);
    }
}
